<?php
namespace app\applet\controller;

use app\BaseController;
use think\facade\Request;

class common extends BaseController
{
    public function __construct()
    {
        /**
         * 设置请求头和跨域操作
         */
        header("Access-Control-Allow-Origin: *");
        header("Access-Control-Allow-Headers: Origin,user,token,time,X-Requested-With,Content-Type Accept, Authorization");
        header('Access-Control-Allow-Methods: GET, POST, PUT,DELETE,OPTIONS');
        if($_SERVER['REQUEST_METHOD'] == 'OPTIONS'){
            exit;
        }
    }

}
